﻿using System;
using System.Collections.Generic;

namespace InfiniTec.Collections.Generic
{
	public static class CollectionExtension
	{
		public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T> items)
		{
			if (collection == null) throw new ArgumentNullException("collection");
			if (items == null) throw new ArgumentNullException("items");

			items.Foreach(collection.Add);
		}
	}
}
